package com.sctvcloud.dongqu.ui.adapter.holder;

import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;

import com.ruihang.generalibrary.ui.adapter.holder.BaseRecylerHolder;
import com.ruihang.generalibrary.ui.widget.CustomEXImageView;
import com.sctvcloud.dongqu.R;
import com.sctvcloud.dongqu.beans.ImageUr;
import com.sctvcloud.dongqu.ui.utils.GlideUtil;

import butterknife.BindView;
import butterknife.ButterKnife;

public class HomePicHolder extends BaseRecylerHolder<ImageUr> {
    @BindView(R.id.item_pic_pic)
    public ImageView img;

    public HomePicHolder(Context context, View itemView) {
        super(context, itemView);
    }

    @Override
    protected void initInject() {
        ButterKnife.bind(this, itemView);
    }

    @Override
    public void setData(ImageUr imgUrl) {
        if (!TextUtils.isEmpty(imgUrl.getImageUrl())) {
            GlideUtil.loadImgWith11Def(context, imgUrl.getImageUrl(), img);
        }
    }


}
